package com.appkubes.fintech.admin.application.bill.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: 买断状态
 * @author: xqc
 * @date: 2020/1/2 15:44
 * @params:
 * @return:
 */
public enum RentBuyEnums {
	//0 未买断 1买断中 2已买断
	未买断(0, "未开始"),
			买断中(1, "买断中"),
	已买断(2, "已买断");


	private static Map<Integer, RentBuyEnums> codeMap;
	private Integer value;
	private String name;

	static { codeMap = new HashMap();
		for (RentBuyEnums code : values()){
			codeMap.put(code.getValue(), code);
		}
	}

	public static RentBuyEnums codeOf(String code)
	{
		return (RentBuyEnums)codeMap.get(code);
	}

	private RentBuyEnums(Integer value, String name)
	{
		this.value = value;
		this.name = name;
	}

	public Integer getValue() {
		return this.value;
	}

	public String getName() {
		return this.name;
	}
}
